<div id="bg">
    <h1>Plan New Budget</h1>

    <?php echo anchor(base_url() . 'budget_manager', 'Go back to my budget list'); ?>

    <label hidden id="link_get_monthly_ex"><?php echo base_url('budget_manager/getMonthlyExpenses') ?></label>
    <label hidden id="link_get_ticket_cost"><?php echo base_url('budget_manager/getTicketCost') ?></label>
    <label hidden id="link_get_sch_fee"><?php echo base_url('budget_manager/getSchoolFee') ?></label>

    <div style="height:600px;">
        <form action="<?php echo base_url('budget_manager/insertBudget') ?>" method="POST">

            <fieldset id="general_expenses_style" >
                <legend>General Expenses</legend>
                <table border="0" width="300px;">
                    <tr>
                        <td>
                            What is your preferred lifestyle?
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <select id="lifestyle" name="lifestyle" class="life_expenses">
                                <?php foreach ($lifestyleList as $row): ?>
                                    <option value="<?php echo $row->lifestyle; ?>"><?php echo $row->lifestyle; ?></option>
                                <?php endforeach; ?>
                            </select>
                            <hr />
                        </td>
                    </tr>
                    <tr>
                        <input type="text" id="rent_id" value="asd" name="rent_id" hidden="true" readonly="readonly"/>
                        <td>
                            <div class="text">Rents</div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div id="rent_slider"></div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="text">Amount: <b>$</b><input type="text" readonly="readonly" id="rent_amount" name="rent_amount" class="amount_style" /></div>
                            <hr />
                        </td>
                    </tr>
                    <tr>
                    <input type="text" id="food_id" value="asd" name="food_id" hidden="true" readonly="readonly"/>
                    <td>
                        <div class="text">Food</div>
                    </td>
                    </tr>
                    <tr>
                        <td>
                            <div id="food_slider"></div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="text">Amount: <b>$</b><input type="text" readonly="readonly" id="food_amount" name="food_amount" class="amount_style"/></div>
                            <hr />
                        </td>
                    </tr>
                    <tr>
                    <input type="text" id="transport_id" value="asd" name="transport_id" hidden="true" readonly="readonly"/>
                    <td>
                        <div class="text">Transport</div>
                    </td>
                    </tr>
                    <tr>
                        <td>
                            <div id="transport_slider"></div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="text">Amount: <b>$</b><input type="text" readonly="readonly" id="transport_amount" name="transport_amount" class="amount_style" /></div>
                            <hr />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div id="sub_total_lifestyle">Sub-total: $<label id="sb_lf" class="grand_total_values"></label></div>
                        </td>
                    </tr>
                </table>
            </fieldset>
            <br />
            <fieldset id="travel_expenses_style">
                <input type="text" id="travel_id" value="asd" name="travel_id" readonly="readonly" hidden="true" />
                <legend>Travel Expenses</legend>
                <table border="0" width="300px;" >
                    <tr>
                        <td>
                            How many times?
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <select id="fly_times" name="fly_times" class="travel_cost">
                                <option value="1">1</option>
                                <option value="2">2</option>
                                <option value="3">3</option>
                                <option value="4">4</option>
                                <option value="5">5</option>
                            </select>
                        </td>
                    </tr>
                    <tr style="height:6px;"><td></td>
                    <tr>
                    <tr>
                        <td>
                            Class?
                        </td>
                    </tr>
                    <tr>
                        <td style="font-size:12px;">
                            <input type="radio" name="group1" value="business" class="travel_cost"> Business
                            <input type="radio" name="group1" value="economy" class="travel_cost" checked> Economy
                            <hr />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="text">Total air ticket fee</div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="text">Amount: <b>$</b><label id="ticket_cost"></label></div>
                        </td>
                    </tr>
                </table>
            </fieldset>

            <fieldset id="education_expenses_style">
                <legend>Education Expenses</legend>
                <table border="0" width="300px;">
                    <tr>
                        <td>
                            Where do you plan to study?
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <select id="location" name="destination" class="sch_fee travel_cost life_expenses">
                                <?php
                                foreach ($countryList as $row) {
                                    ?>
                                    <option value=<?php echo $row->country_id; ?>><?php echo $row->country_name; ?></option>
                                    <?php
                                }
                                ?>
                            </select>
                        </td>
                    </tr>
                    <tr style="height:10px;">
                    </tr>
                    <tr>
                        <td>
                            School type?
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <select id="sch_type" name="sch_type" class="sch_fee">
                                <?php
                                foreach ($insType as $row) {
                                    ?>
                                    <option value=<?php echo $row->institution_type_id; ?>><?php echo $row->institution_type_desc; ?></option>
                                    <?php
                                }
                                ?>
                            </select>
                        </td>
                    </tr>
                    <tr style="height:10px;">
                    </tr>
                    <tr>
                        <td>
                            Course genre?
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <select id="course" name="course" class="sch_fee">
                                <?php
                                foreach ($courseList as $row) {
                                    ?>
                                    <option value=<?php echo $row->course_id; ?>><?php echo $row->course_name; ?></option>
                                    <?php
                                }
                                ?>
                            </select>
                            <hr />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="text">Tuition Fee</div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="text">Amount: <b>$</b><label id="tuition_fees"></label></div>
                        </td>
                    </tr>
                </table>
            </fieldset>

            <fieldset id="converter_style">
                <legend>Converter</legend>
                <table border="0">
                    <tr>
                        <td colspan="2">Grand Total : $<label id="grand_total"></label>
                        </td>
                    </tr>
                    <tr>
                        <td width="100px;">Convert to
                        </td>
                        <td>
                            <select id="currency">
                                <option value="yuan">China Yuan</option>
                                <option value="dong">Vietnamese Dong</option>
                                <option value="rupiah">Indonesian Rupiah</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            Amount : <label id="converter"></label>
                        </td>
                    </tr>
                </table>
            </fieldset>
            <div id="filename_style">
                <label>Budget Name:</label><br />
                <input id="filename" name="filename" type="textfield" value="new budget" style="width:300px;"/>
                <br />
                <input name="budgetSave" value="Save" type="submit" />
            </div>
        </form>
        <input id="calculate" value="Calculate" type="submit" />
    </div>
</div>